bitkeeper revision 1.56 (3e4fa8f8qFVqiOGx5RWgOayKOHE4qQ)
authorkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Sun, 16 Feb 2003 15:06:32 +0000 (15:06 +0000)
committerkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Sun, 16 Feb 2003 15:06:32 +0000 (15:06 +0000)
blkdev.h, ll_rw_blk.c:
  Make block-device layer a bit more robust for non-existsent devices.

xen-2.4.16/drivers/block/ll_rw_blk.c
xen-2.4.16/include/xeno/blkdev.h

index 348b516c1db34480591e85f2031a0e8fe9787e30..ca8427e8780e2ca4fc2e2baf7587803ae557ca7d 100644 (file)
@@ -1122,7 +1122,7 @@ void generic_make_request (int rw, struct buffer_head * bh)
         */
        do {
                q = blk_get_queue(bh->b_rdev);
-               if (!q) {
+               if (!q || !q->make_request_fn) {
                        printk(KERN_ERR
                               "generic_make_request: Trying to access "
                               "nonexistent block-device %s (%ld)\n",
index f5c1d25d751ef7f44386320558b1cf1dd3cada32..312cc586780be70618014540aab3fd0d79f5ad4c 100644 (file)
@@ -123,11 +123,15 @@ static inline void mark_buffer_clean(struct buffer_head * bh)
 
 static inline void buffer_IO_error(struct buffer_head * bh)
 {
-        mark_buffer_clean(bh);
-        /*
-         * b_end_io has to clear the BH_Uptodate bitflag in the error case!
-         */
-        bh->b_end_io(bh, 0);
+    extern void end_block_io_op(struct buffer_head *bh);
+
+    mark_buffer_clean(bh);
+    /*
+     * b_end_io has to clear the BH_Uptodate bitflag in the error case!
+     */
+    bh->b_end_io(bh, 0);
+    /* XXX KAF */
+    end_block_io_op(bh);
 }
 
 /**** XXX END OF BUFFER_HEAD STUFF XXXX ****/